FROM elitesland/openjdk11-alpine:latest
VOLUME /tmp
ARG JAR_FILE
COPY ${JAR_FILE} app.jar
#RUN echo -e http://mirrors.ustc.edu.cn/alpine/v3.7/main/ > /etc/apk/repositories
#RUN apk add --update font-adobe-100dpi ttf-dejavu fontconfig
ENV ACTIVE=$ACTIVE
ENV JAVA_OPTS=$JAVA_OPTS
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar --spring.profiles.active=$ACTIVE" ]